<?php declare(strict_types=1);

namespace App\Validator;

use App\Annotation\Mapping\AlphaDash;
use Swoft\Validator\Annotation\Mapping\Enum;
use Swoft\Validator\Annotation\Mapping\IsInt;
use Swoft\Validator\Annotation\Mapping\IsString;
use Swoft\Validator\Annotation\Mapping\Length;
use Swoft\Validator\Annotation\Mapping\Validator;

/**
 * Class TestValidator
 *
 * @since 2.0
 *
 * @Validator(name="AppValidator")
 */
class AppValidator
{
    /**
     * @IsString()
     *
     * @var string
     */
    protected $account;

    /**
     * @IsString()
     *
     * @Length(min=6, max=20, message="长度不足")
     * @var string
     */
    protected $password;

    /**
     * @IsString(name="type")
     * @Enum(values={"newspost","post","me","location","hotnews"}, message="type不合法")
     * @var string
     */
    protected $post_list_type;

    /**
     * @IsInt(message="page必须为整数")
     * @var integer
     */
    protected $page;

}
